*****************************************************
******Objectified & Dehumanized Data Cleaning********
****************February 18, 2022********************
*****************************************************


*drop preview survey observations 

drop in 2/21
drop in 2

*drop respondents who did not consent to participate (n=9)

drop if ConsentQ1=="I do not consent to these terms"


*ideology variable 
*coded such that higher values=more conservative 

gen conservative=. 
replace conservative=7 if QID1=="Extremely conservative" 
replace conservative=6 if QID1=="Conservative" 
replace conservative=5 if QID1=="Slightly conservative" 
replace conservative=4 if QID1=="Moderate; middle of the road"
replace conservative=3 if QID1=="Slightly liberal" 
replace conservative=2 if QID1=="Liberal" 
replace conservative=1 if QID1=="Extremely liberal" 

*Republican party variable
*Republican as the reference group

gen Republican=. 
replace Republican=1 if Q2=="Republican"
replace Republican=0 if Q2=="Democrat"
replace Republican=0 if Q2=="Independent" 
replace Republican=0 if Q2=="Other" 

*Democrat party variable
*Democrat as the reference group

gen Democrat=. 
replace Democrat=1 if Q2=="Democrat"
replace Democrat=0 if Q2=="Republican" 
replace Democrat=0 if Q2=="Independent" 
replace Democrat=0 if Q2=="Other" 

*sex assigned at birth 
*female as reference category 

gen sexfemale=. 
replace sexfemale=1 if Q3=="Female" 
replace sexfemale=0 if Q3=="Male" 


*gender description
*woman as reference category 

gen genderfemale=. 
replace genderfemale=1 if Q4=="Woman" 
replace genderfemale=0 if Q4=="Man" 


*femininity scale
*higher scores indicate more feminine feelings

gen femininity=. 
replace femininity=7 if Q5_2=="7"
replace femininity=6 if Q5_2=="6"
replace femininity=5 if Q5_2=="5"
replace femininity=4 if Q5_2=="4"
replace femininity=3 if Q5_2=="3"
replace femininity=2 if Q5_2=="2"
replace femininity=1 if Q5_2=="1"


*masculinity scale
*higher scores indicate more masculine feelings 

gen masculinity=. 
replace masculinity=7 if Q6_1=="7"
replace masculinity=6 if Q6_1=="6"
replace masculinity=5 if Q6_1=="5"
replace masculinity=4 if Q6_1=="4"
replace masculinity=3 if Q6_1=="3"
replace masculinity=2 if Q6_1=="2"
replace masculinity=1 if Q6_1=="1"


*education 
*higher values indicate more education 

gen education=. 
replace education=6 if Q6=="Graduate degree" 
replace education=5 if Q6=="Bachelor's degree"
replace education=4 if Q6=="Associate degree in college"
replace education=3 if Q6=="Some college but no degree"
replace education=2 if Q6=="High school diploma or equivalent" 
replace education=1 if Q6=="Did not complete high school"


*income
*higher values indicate more income 

gen income=. 
replace income=7 if Q8=="Over $120,000"
replace income=6 if Q8=="$100,001 to $120,000"
replace income=5 if Q8=="$80,001 to $100,000"
replace income=4 if Q8=="$60,001 to $80,000"
replace income=3 if Q8=="$40,001 to $60,000"
replace income=2 if Q8=="$20,000 to $40,000"
replace income=1 if Q8=="Below $20,000"

*race 
*white is the reference category 

gen white=. 
replace white=1 if Q9=="White or Caucasian" 
replace white=0 if Q9!="White or Caucasian" 

*latinx
*latinx/spanish/hispanic is the reference category 

gen latinx=. 
replace latinx=1 if Q10=="Yes"
replace latinx=0 if Q10=="No"

*age variable

replace Q11="46" if Q11==".46"

destring Q11, generate(age)

*replace typo with mean age 

replace age=45.8 if age==4

*evangelical identification
*reference category is evangelical 

gen evangelical=. 
replace evangelical=1 if Q18=="Yes, I  would"
replace evangelical=0 if Q18=="No, I would not" 


*Political Participation Variables* 
*higher value indicate higher likelihood of participating 

gen protest=. 
replace protest=5 if Q86_1=="Extremely likely"
replace protest=4 if Q86_1=="Very likely"
replace protest=3 if Q86_1=="Moderately likely"
replace protest=2 if Q86_1=="A little likely" 
replace protest=1 if Q86_1=="Not at all likely"

gen schoolboard=. 
replace schoolboard=5 if Q86_2=="Extremely likely"
replace schoolboard=4 if Q86_2=="Very likely"
replace schoolboard=3 if Q86_2=="Moderately likely"
replace schoolboard=2 if Q86_2=="A little likely" 
replace schoolboard=1 if Q86_2=="Not at all likely"

gen petition=. 
replace petition=5 if Q86_3=="Extremely likely"
replace petition=4 if Q86_3=="Very likely"
replace petition=3 if Q86_3=="Moderately likely"
replace petition=2 if Q86_3=="A little likely" 
replace petition=1 if Q86_3=="Not at all likely"

gen paperpetition=.
replace paperpetition=5 if Q86_4=="Extremely likely"
replace paperpetition=4 if Q86_4=="Very likely"
replace paperpetition=3 if Q86_4=="Moderately likely"
replace paperpetition=2 if Q86_4=="A little likely" 
replace paperpetition=1 if Q86_4=="Not at all likely"

gen religmoney=.
replace religmoney=5 if Q86_5=="Extremely likely"
replace religmoney=4 if Q86_5=="Very likely"
replace religmoney=3 if Q86_5=="Moderately likely"
replace religmoney=2 if Q86_5=="A little likely" 
replace religmoney=1 if Q86_5=="Not at all likely"


gen polmoney=.
replace polmoney=5 if Q86_6=="Extremely likely"
replace polmoney=4 if Q86_6=="Very likely"
replace polmoney=3 if Q86_6=="Moderately likely"
replace polmoney=2 if Q86_6=="A little likely" 
replace polmoney=1 if Q86_6=="Not at all likely"

gen polmeeting=.
replace polmeeting=5 if Q86_7=="Extremely likely"
replace polmeeting=4 if Q86_7=="Very likely"
replace polmeeting=3 if Q86_7=="Moderately likely"
replace polmeeting=2 if Q86_7=="A little likely" 
replace polmeeting=1 if Q86_7=="Not at all likely"

gen invite=.
replace invite=5 if Q86_8=="Extremely likely"
replace invite=4 if Q86_8=="Very likely"
replace invite=3 if Q86_8=="Moderately likely"
replace invite=2 if Q86_8=="A little likely" 
replace invite=1 if Q86_8=="Not at all likely"

gen information=.
replace information=5 if Q86_9=="Extremely likely"
replace information=4 if Q86_9=="Very likely"
replace information=3 if Q86_9=="Moderately likely"
replace information=2 if Q86_9=="A little likely" 
replace information=1 if Q86_9=="Not at all likely"

gen socialmedia=.
replace socialmedia=5 if Q86_10=="Extremely likely"
replace socialmedia=4 if Q86_10=="Very likely"
replace socialmedia=3 if Q86_10=="Moderately likely"
replace socialmedia=2 if Q86_10=="A little likely" 
replace socialmedia=1 if Q86_10=="Not at all likely"


***Treatment Indicator 

destring Q87_PageSubmit, generate(T1)

gen treatment=. 
replace treatment=1 if inrange(T1, 5, 29)
replace treatment=0 if treatment==.


*drop observation- participant did not complete the experimental portion

drop in 1149



*****Women in Politics Questions******
*higher values indicate more support for women in politiccs 

*Too few women in high political office 

gen fewwomen=. 

replace fewwomen=5 if Q12_1=="Strongly Agree"
replace fewwomen=4 if Q12_1=="Agree"
replace fewwomen=3 if Q12_1=="Neither agree nor disagree" 
replace fewwomen=2 if Q12_1=="Somewhat disagree" 
replace fewwomen=1 if Q12_1=="Strongly disagree" 

gen morewomen=. 

replace morewomen=5 if Q12_2=="Strongly Agree"
replace morewomen=4 if Q12_2=="Agree"
replace morewomen=3 if Q12_2=="Neither agree nor disagree" 
replace morewomen=2 if Q12_2=="Somewhat disagree" 
replace morewomen=1 if Q12_2=="Strongly disagree" 


gen competent=. 

replace competent=5 if Q12_3=="Strongly disagree" 
replace competent=4 if Q12_3=="Somewhat disagree" 
replace competent=3 if Q12_3=="Neither agree nor disagree" 
replace competent=2 if Q12_3=="Agree"
replace competent=1 if Q12_3=="Strongly Agree" 


gen presidency=. 

replace presidency=5 if Q12_4=="Strongly Agree"
replace presidency=4 if Q12_4=="Agree"
replace presidency=3 if Q12_4=="Neither agree nor disagree" 
replace presidency=2 if Q12_4=="Somewhat disagree" 
replace presidency=1 if Q12_4=="Strongly disagree" 


*******Ratings of Women Leaders*******
***higher values indicate more positive ratings 

gen Warren=. 
replace Warren=10 if Q120_1=="10. Very positively"
replace Warren=9 if Q120_1=="9"
replace Warren=8 if Q120_1=="8"
replace Warren=7 if Q120_1=="7"
replace Warren=6 if Q120_1=="6"
replace Warren=5 if Q120_1=="5"
replace Warren=4 if Q120_1=="4"
replace Warren=3 if Q120_1=="3"
replace Warren=2 if Q120_1=="2"
replace Warren=1 if Q120_1=="1"
replace Warren=0 if Q120_1=="0. Very Negatively"


gen Harris=. 
replace Harris=10 if Q113_1=="10. Very positively"
replace Harris=9 if Q113_1=="9"
replace Harris=8 if Q113_1=="8"
replace Harris=7 if Q113_1=="7"
replace Harris=6 if Q113_1=="6"
replace Harris=5 if Q113_1=="5"
replace Harris=4 if Q113_1=="4"
replace Harris=3 if Q113_1=="3"
replace Harris=2 if Q113_1=="2"
replace Harris=1 if Q113_1=="1"
replace Harris=0 if Q113_1=="0. Very Negatively"



gen Haley=. 
replace Haley=10 if Q107_1=="10. Very positively"
replace Haley=9 if Q107_1=="9"
replace Haley=8 if Q107_1=="8"
replace Haley=7 if Q107_1=="7"
replace Haley=6 if Q107_1=="6"
replace Haley=5 if Q107_1=="5"
replace Haley=4 if Q107_1=="4"
replace Haley=3 if Q107_1=="3"
replace Haley=2 if Q107_1=="2"
replace Haley=1 if Q107_1=="1"
replace Haley=0 if Q107_1=="0. Very Negatively"



gen Pelosi=. 
replace Pelosi=10 if Q104_1=="10. Very positively"
replace Pelosi=9 if Q104_1=="9"
replace Pelosi=8 if Q104_1=="8"
replace Pelosi=7 if Q104_1=="7"
replace Pelosi=6 if Q104_1=="6"
replace Pelosi=5 if Q104_1=="5"
replace Pelosi=4 if Q104_1=="4"
replace Pelosi=3 if Q104_1=="3"
replace Pelosi=2 if Q104_1=="2"
replace Pelosi=1 if Q104_1=="1"
replace Pelosi=0 if Q104_1=="0. Very Negatively"



gen AOC=. 
replace AOC=10 if Q96_1=="10. Very positively"
replace AOC=9 if Q96_1=="9"
replace AOC=8 if Q96_1=="8"
replace AOC=7 if Q96_1=="7"
replace AOC=6 if Q96_1=="6"
replace AOC=5 if Q96_1=="5"
replace AOC=4 if Q96_1=="4"
replace AOC=3 if Q96_1=="3"
replace AOC=2 if Q96_1=="2"
replace AOC=1 if Q96_1=="1"
replace AOC=0 if Q96_1=="0. Very Negatively"


**************************************************
***********Dual Model of Dehumanization***********
**************************************************

**higher values indicate more dehumanization 


******Mechanistic Traits 

gen passionate=. 
replace passionate=4 if Q19_1=="1. Not at all"
replace passionate=3 if Q19_1=="2"
replace passionate=2 if Q19_1=="3"
replace passionate=1 if Q19_1=="4. Extremely Well" 

gen funloving=. 
replace funloving=4 if Q19_2=="1. Not at all"
replace funloving=3 if Q19_2=="2"
replace funloving=2 if Q19_2=="3"
replace funloving=1 if Q19_2=="4. Extremely Well" 

gen curious=. 
replace curious=4 if Q19_3=="1. Not at all"
replace curious=3 if Q19_3=="2"
replace curious=2 if Q19_3=="3"
replace curious=1 if Q19_3=="4. Extremely Well" 

gen sociable=. 
replace sociable=4 if Q19_4=="1. Not at all"
replace sociable=3 if Q19_4=="2"
replace sociable=2 if Q19_4=="3"
replace sociable=1 if Q19_4=="4. Extremely Well" 

gen trusting=. 
replace trusting=4 if Q19_5=="1. Not at all"
replace trusting=3 if Q19_5=="2"
replace trusting=2 if Q19_5=="3"
replace trusting=1 if Q19_5=="4. Extremely Well" 

gen jealous=. 
replace jealous=4 if Q19_6=="1. Not at all"
replace jealous=3 if Q19_6=="2"
replace jealous=2 if Q19_6=="3"
replace jealous=1 if Q19_6=="4. Extremely Well" 

gen nervous=. 
replace nervous=4 if Q19_7=="1. Not at all"
replace nervous=3 if Q19_7=="2"
replace nervous=2 if Q19_7=="3"
replace nervous=1 if Q19_7=="4. Extremely Well" 

gen impatient=. 
replace impatient=4 if Q19_8=="1. Not at all"
replace impatient=3 if Q19_8=="2"
replace impatient=2 if Q19_8=="3"
replace impatient=1 if Q19_8=="4. Extremely Well" 

gen distractable=. 
replace distractable=4 if Q19_9=="1. Not at all"
replace distractable=3 if Q19_9=="2"
replace distractable=2 if Q19_9=="3"
replace distractable=1 if Q19_9=="4. Extremely Well" 

gen aggressive=. 
replace aggressive=4 if Q19_10=="1. Not at all"
replace aggressive=3 if Q19_10=="2"
replace aggressive=2 if Q19_10=="3"
replace aggressive=1 if Q19_10=="4. Extremely Well" 


***reliability (.79)

alpha passionate-aggressive 

******Animalistic Traits 

gen humble=. 
replace humble=4 if Q48_1=="1. Not at all"
replace humble=3 if Q48_1=="2"
replace humble=2 if Q48_1=="3"
replace humble=1 if Q48_1=="4. Extremely well" 

gen thorough=. 
replace thorough=4 if Q48_2=="1. Not at all"
replace thorough=3 if Q48_2=="2"
replace thorough=2 if Q48_2=="3"
replace thorough=1 if Q48_2=="4. Extremely well" 

gen organized=. 
replace organized=4 if Q48_3=="1. Not at all"
replace organized=3 if Q48_3=="2"
replace organized=2 if Q48_3=="3"
replace organized=1 if Q48_3=="4. Extremely well" 

gen polite=. 
replace polite=4 if Q48_4=="1. Not at all"
replace polite=3 if Q48_4=="2"
replace polite=2 if Q48_4=="3"
replace polite=1 if Q48_4=="4. Extremely well" 

gen broadminded=. 
replace broadminded=4 if Q48_5=="1. Not at all"
replace broadminded=3 if Q48_5=="2"
replace broadminded=2 if Q48_5=="3"
replace broadminded=1 if Q48_5=="4. Extremely well" 

gen cold=. 
replace cold=4 if Q48_6=="1. Not at all"
replace cold=3 if Q48_6=="2"
replace cold=2 if Q48_6=="3"
replace cold=1 if Q48_6=="4. Extremely well" 

gen shallow=. 
replace shallow=4 if Q48_7=="1. Not at all"
replace shallow=3 if Q48_7=="2"
replace shallow=2 if Q48_7=="3"
replace shallow=1 if Q48_7=="4. Extremely well" 

gen stingy=. 
replace stingy=4 if Q48_8=="1. Not at all"
replace stingy=3 if Q48_8=="2"
replace stingy=2 if Q48_8=="3"
replace stingy=1 if Q48_8=="4. Extremely well" 

gen hardhearted=. 
replace hardhearted=4 if Q48_9=="1. Not at all"
replace hardhearted=3 if Q48_9=="2"
replace hardhearted=2 if Q48_9=="3"
replace hardhearted=1 if Q48_9=="4. Extremely well" 

gen impersonal=. 
replace impersonal=4 if Q48_10=="1. Not at all"
replace impersonal=3 if Q48_10=="2"
replace impersonal=2 if Q48_10=="3"
replace impersonal=1 if Q48_10=="4. Extremely well" 


***reliability (.81)

alpha humble-impersonal



***Abortion
***Higher values indicate more support for abortion 

gen abortion=.
replace abortion=1 if Q89=="1. Never Justified" 
replace abortion=2 if Q89=="2" 
replace abortion=3 if Q89=="3"
replace abortion=4 if Q89=="4"
replace abortion=5 if Q89=="5"
replace abortion=6 if Q89=="6"
replace abortion=7 if Q89=="7"
replace abortion=8 if Q89=="8"
replace abortion=9 if Q89=="Always Justified"


****Birth Control Attitudes
***Higher values=more support for contraception access

gen contraception=. 
replace contraception=5 if Q90_1=="Strongly Agree"
replace contraception=4 if Q90_1=="Agree" 
replace contraception=3 if Q90_1=="Neither agree nor disagree"
replace contraception=2 if Q90_1=="Disagree" 
replace contraception=1 if Q90_1=="Strongly Disagree"


gen plannedparent=. 
replace plannedparent=5 if Q90_2=="Strongly Disagree" 
replace plannedparent=4 if Q90_2=="Disagree" 
replace plannedparent=3 if Q90_2=="Neither agree nor disagree" 
replace plannedparent=2 if Q90_2=="Agree" 
replace plannedparent=1 if Q90_2=="Strongly Agree" 


gen prefhiring=. 
replace prefhiring=5 if Q90_3=="Strongly Agree"
replace prefhiring=4 if Q90_3=="Agree"
replace prefhiring=3 if Q90_3=="Neither agree nor disagree"
replace prefhiring=2 if Q90_3=="Disagree"
replace prefhiring=1 if Q90_3=="Strongly Disagree"


gen childcare=. 
replace childcare=5 if Q90_4=="Strongly Agree"
replace childcare=4 if Q90_4=="Agree"
replace childcare=3 if Q90_4=="Neither agree nor disagree"
replace childcare=2 if Q90_4=="Disagree"
replace childcare=1 if Q90_4=="Strongly Disagree"


gen periodproducts=. 
replace periodproducts=5 if Q90_5=="Strongly Agree"
replace periodproducts=4 if Q90_5=="Agree"
replace periodproducts=3 if Q90_5=="Neither agree nor disagree"
replace periodproducts=2 if Q90_5=="Disagree"
replace periodproducts=1 if Q90_5=="Strongly Disagree"


********Media Consumption*********

*pornography viewing
*higher values indicate more frequent use 

destring Q20, gen(porn) force

replace porn=1 if Q20=="1.	Never"
replace porn=9 if Q20=="9.  Several times a day"


*fashion magazine
*higher values indicate more frequent use

destring Q21, gen(fashionmag) force

replace fashionmag=1 if Q21=="1. I do not read magazines such as these"
replace fashionmag=6 if Q21=="6. More than TWO hours a day" 

*reality television 
*higher values indicate more frequency 

destring Q22, generate(realitytv)


*****remove those who opted for data to be removed from the study 

drop if Q15=="Yes, I would like to have my data removed from the study"


**media consumption scale 

tab porn 
tab fashionmag
tab realitytv

gen mediaconsume=. 
replace mediaconsume=(porn + fashionmag + realitytv)


***Missing values 

*(A) If 10% or less of the values on the covariate are missing, then we recode the missing values to the overall mean. (B) If 11% or more of the values on the covariate are missing, then we recode the missing values to a constant (for instance 0) and include a dummy variable indicating whether the response on the covariate was missing or not (Gerber & Green, 2012).



misstable sum age Republican Democrat genderfemale education white income evangelical mediaconsume





***suport for women in politics summated scale 


gen WIP=. 
replace WIP=(fewwomen + morewomen + competent + presidency)/4

***evaluations of women politicians

gen WPE=. 
replace WPE=(Warren + Harris + Pelosi + Haley + AOC)/5


****dual model of dehumanization 

gen mechanistic=. 
replace mechanistic=(passionate + funloving + curious + sociable + trusting + jealous + nervous + impatient +distractable + aggressive)/10


gen animalistic=. 
replace animalistic=(humble + thorough + organized + polite + broadminded + cold + shallow + stingy + hardhearted + impersonal)/10


gen dehumanization=. 
replace dehumanization=(passionate + funloving + curious + sociable + trusting + jealous + nervous + impatient +distractable + aggressive + humble + thorough + organized + polite + broadminded + cold + shallow + stingy + hardhearted + impersonal)/20 






















